{% extends "layout.html" %}

{% block title %}Phone Add{% endblock %}


{% block content %}
<ul class="nav nav-tabs custom-tab">
    <li><a href="{{ base_url }}admin/phone.php" data-toggle="tab"><i class="icon-list"></i><span>Phone</span></a></li>
    <li class="active"><a href="" data-toggle="tab"><i class="icon-plus"></i><span>Add New Phone</span></a></li>
</ul>
<div class="row user-form">
    <h2>New Phone</h2>
    <form class="form-horizontal custom-form" method="post" action="phone.php" enctype="multipart/form-data">
        <input type="hidden" name="action" value="add"/>
        <input type="hidden" name="save" value="1"/>
        <fieldset>
            <div class="span5">
            <div>
                <label for="model">Phone model</label>
                <input type="text" name="model" id="model" class="input-xlarge" placeholder="Phone Dodel"/>
            </div>
            <div>
                <label for="price">Price</label>
                <input type="text" name="price" id="model" class="input-xlarge" placeholder="Phone Price"/>
            </div>

            <div>
                <label for="photo">Photo</label>
                <input type="file" name="photo" class="input-file" id="photo"/>
            </div>
            <div class="control-group custom-radio">
                <label class="control-label">Status</label>
                <div class="controls">
                    <label class="radio">
                        <input type="radio" checked="checked" value="new" id="status1" name="status">
                        New
                    </label>
                    <label class="radio">
                        <input type="radio" value="second-hand" id="status2" name="status">
                        Second Hand
                    </label>
                </div>
            </div>

            </div>
            <div class="span4">
            <div>
                <label for="brand">Brand</label>

                <select name="brand" id="brand">
                    {% for brand in brandname %}
                    <option value="{{brand.id}}">{{brand.name}}</option>
                    {% endfor %}
                </select>
            </div>
            <div>
                <label for="promotion">Promotion</label>
                <input type="text" name="promotion" id="promotion" class="input-xlarge" placeholder="Promotion"/>
            </div>
            
            <div>
                <label for="release">Release date</label>
                <input type="text" name="release" id="release" class="input-xlarge" placeholder="Release Date"/>
            </div>
            <div>
                <label for="remark">Remark</label>
                <textarea cols="50" rows="4" class="input-xlarge" name="remark" id="remark"></textarea>
            </div>
            </div>
            <div class="clearfix"></div>
            <div class="row">
                <h2>Phone Detail</h2>
            </div>
             <div class="row">
                 
                 <div class="phone-detail">
                     {% for dp in detail_options %}
                     
                     <div>
                         <label for="phone_option_{{ dp.key }}">{{ dp.value }}</label>
                         <textarea name="detail[option][{{ dp.key }}]"  id="phone_option_{{ dp.key }}"></textarea>
                     </div>
                     
                     {% endfor %}
                 </div>
                <button type="submit" class="btn btn-primary" >Save</button>
            </div>
            
        </fieldset>
    </form>
</div>

{% endblock %}